#include "ProcessPool.hpp"
#include "Task.hpp"
// 声明外部变量
TaskManager tm;

void Usage(std::string proc)
{
 std::cout << "Usage: " << proc << " process-num" << std::endl;
}
// 我们⾃⼰就是master 
int main(int argc, char *argv[])
{
    if (argc != 2)
    {
        Usage(argv[0]);
        return OK;
    }
    int num = std::stoi(argv[1]);
    ProcessPool *pp = new ProcessPool(num, Worker);
    pp->InitProcessPool();
    pp->DispatchTask();
    pp->CleanProcessPool();
    delete pp;
    return 0;
}